package com.oig.sys.msg.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;


/**
 * @author wuxl
 * 只连一个mq，不做动态连接，但动态配置交换机，队列等
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_mq_config")
@EntityListeners({AuditingEntityListener.class})
public class TbMqConfig implements Serializable {

	/**
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	/**
	 * 应用id
	 */
	@Column(name = "system_id")
	private Integer systemId;

	/**
	 * 应用名称
	 */
	@Column(name = "system_name")
	private String systemName;

	/**
	 * 主单据类型
	 */
	@Column(name = "business_type")
	private String businessType;

	/**
	 * 关联单据
	 */
	@Column(name = "relation_type")
	private String relationType;

	/**
	 * 生产消息交换机
	 */
	@Column(name = "producer_exchange")
	private String producerExchange;

	/**
	 * 生产消息匹配key
	 */
	@Column(name = "producer_key")
	private String producerKey;


	/**
	 * 创建人名称
	 */
	@Column(name = "create_name")
	private String createName;

	/**
	 */
	@CreatedBy
	@Column(name = "create_id")
	private Integer createId;

	/**
	 * 创建时间
	 */
	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private java.util.Date createTime;

	/**
	 */
	@LastModifiedBy
	@Column(name = "last_update_id")
	private Integer lastUpdateId;

	/**
	 * 最后修改人名称
	 */
	@Column(name = "last_update_name")
	private String lastUpdateName;

	/**
	 * 最后修改时间
	 */
	@LastModifiedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_update_time")
	private java.util.Date lastUpdateTime;

	/**
	 */
	@Version
	@Column(name = "version")
	private Integer version;

	/**
	 * 状态
	 */
	@Column(name = "status")
	private String status;


}
